﻿@model EventPlanner.Models.UserViewModel

@{
    ViewBag.Title = "Detalles";
}
 <div class="subtitle">
<h2>Detalles de cuenta</h2>
</div>
<p></p>
<fieldset>
    

    <div class="display-label">@EventPlanner.Resources.Account.Register.lbl_NombreUsuario</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.UserName)
    </div>

    <div class="display-label">@EventPlanner.Resources.Account.Register.lbl_Correo</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Email)
    </div>

    <div class="display-label">@EventPlanner.Resources.Account.Details.lbl_UltimaVezVisto</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.LastSeen)
    </div>

    <div class="display-label">@EventPlanner.Resources.Account.Details.lbl_FechaCreacion </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Created)
    </div>

     <div class="display-label">@EventPlanner.Resources.Account.Details.lbl_TipoCuenta</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Role)
    </div>

     <div class="display-label">@EventPlanner.Resources.Account.Details.lbl_Activa</div>
    <div class="display-field">
        @if (Membership.GetUser(Model.UserName).IsApproved) { 
            @Html.Raw(@EventPlanner.Resources.Global.Global.lbl_Si);

          }
          else
          {
              @Html.Raw(@EventPlanner.Resources.Global.Global.lbl_No);
          }
    </div>


</fieldset>
<p>
    @Html.ActionLink(@EventPlanner.Resources.Account.Details.lbl_ResetearContraseña, "ResetPassword",new { Name = Model.UserName },
    new { onclick = "return confirm('¿Está seguro que desea resetear la contraseña?');" })   
     |
    @if (Membership.GetUser(Model.UserName).IsApproved)    {
     @Html.ActionLink(@EventPlanner.Resources.Account.Details.lbl_DesactivarCuenta, "Deactivate", new { Name = Model.UserName },
    new { onclick = "return confirm('¿Está seguro que desea desactivar esta cuenta?');" }) }
    else {
     @Html.ActionLink(@EventPlanner.Resources.Account.DetailsAdmin.lbl_ReactivarCuenta, "Activate", new { Name = Model.UserName },
    new { onclick = "return confirm('¿Está seguro que desea activar nuevamente esta cuenta?');" })   
    } |
        
      @Html.ActionLink(@EventPlanner.Resources.Global.Global.lbl_Volver, "Index")
   
       
        
   
</p>
